package day06;

/*
 * Author: JacksonCoder
 * FileName: PriorityQueueDemo
 * Version: 1.0.0
 * Date: 2025/4/13
 */

import java.util.PriorityQueue;

public class PriorityQueueDemo {

    public static void main(String[] args) {
        PriorityQueue<Integer> pq = new PriorityQueue<>();
        pq.offer(5);
        pq.offer(3);
        pq.offer(1);

        while(!pq.isEmpty()){
            System.out.println(pq.poll()); //
        }
    }

}
